﻿using BugTracker.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace BugTracker.Controllers
{
    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            IndexViewModel vm = new IndexViewModel();
            List<WorkItem> model = new List<WorkItem>();
            model.Add(new BugClass { Text = "Wrong Hex value", DateCreated = DateTime.Now, Priority = BugTypes.Low, Step = "Navigate to the About page."});
            model.Add(new BugClass {Text = "Form not submiting", DateCreated = DateTime.Now, Priority = BugTypes.High, Step = "Submit the contact form" });
            model.Add(new TaskClass { Text = "Call joe", DateCreated = DateTime.Now, Priority = BugTypes.Low, Description = "Need to follow up" });
            model.Add(new TaskClass { Text = "email Susan", DateCreated = DateTime.Now, Priority = BugTypes.Medium, Description = "second follow up" });
            vm.Buggs = model;
            return View(vm);
        }

        public ActionResult About()
        {
            ViewBag.Message = "Your application description page.";

            return View();
        }

        public ActionResult Contact()
        {
            ViewBag.Message = "Your contact page.";

            return View();
        }
    }
}